xen/tasklet: Fix return value truncation on arm64
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Apr 2019 12:54:36 +0000 (13:54 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 27 Dec 2019 17:18:57 +0000 (17:18 +0000)
commit08aa26349a5262563f0b8f69b08a67e2c4999410
tree719101bb5e243ab367ec29e55204662d11280d26
parent21867648033df025129eca9bbcfdbd0310d13562
xen/tasklet: Fix return value truncation on arm64

The use of return_reg() assumes ARM's 32bit ABI.  Therefore, a failure such as
-EINVAL will appear as a large positive number near 4 billion to a 64bit ARM
guest which happens to use continue_hypercall_on_cpu().

Introduce a new arch_hypercall_tasklet_result() hook which is implemented by
both architectures, and drop the return_reg() macros.  This logic will be
extended in a later change to make continuations out of the tasklet work.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien@xen.org>
xen/arch/arm/traps.c
xen/arch/x86/hypercall.c
xen/common/domain.c
xen/include/asm-arm/regs.h
xen/include/asm-x86/regs.h
xen/include/xen/domain.h